from likeshop_project.base.mybase import Tools
from likeshop_project.accountapi.login_api import login_model

class  get_order_list_model(Tools):
    path = '/api/order/lists'
    def get_order_list_action(self,hb,type=all):

        res = self.huihua.get(url=self.hosturl+self.path,headers=hb)
        return res.json()


if __name__ == '__main__':

    import requests
    s = requests.session()
    re = login_model(huihua=s)
    mag = re.login_action(account='17909898989',password='123wqewqrf')
    gettoken = mag['data'].get('token')
    hb = {'token':gettoken}
    re = get_order_list_model(huihua=s)
    msg =re.get_order_list_action(hb=hb)
    print(msg)
